﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace PCTInterface
{
    public partial class Log : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack || Request.QueryString.Count==0)
            {
                Response.End();
            }
        }

        protected string GetLogText()
        {
            try
            {
                string fullPath = Server.MapPath("~/Log/" + Request.QueryString[0]);
                return File.ReadAllText(fullPath, System.Text.Encoding.UTF8);
            }
            catch
            {
                return "";
            }
        }
    }
}